package com.hk.core.commons.ui.antd;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.hk.core.commons.ui.BaseTreeNode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * @author kevin
 * @date 2019-9-5 20:08
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class AntDesignTreeNode extends BaseTreeNode<AntDesignTreeNode> {

    /**
     * 是否禁用
     */
    private Boolean disabled = false;

    /**
     * 是否没有子级
     */
    private Boolean isLeaf = false;

    /**
     * 复选框是否禁用
     */
    private Boolean disableCheckbox;

    /**
     * 设置节点是否可被选中
     */
    private Boolean selectable;

    /**
     * AntDesignTree 每个 tree 节点以 key作为唯一主键
     */
    public Serializable getKey() {
        return getValue();
    }

}
